Devices that capture images of a three-dimensional object by irradiating the object with light and inspect the external appearance of the object on the basis of the captured images are conventionally used. Techniques for changing the illumination direction during inspection are also proposed. For example, in the concrete surface inspection device disclosed in Japanese Patent Application Laid-Open No. 2011-117788, light is emitted from different directions. Grime on the concrete surface appears in every captured image, whereas defects such as cracks appear in only some of the captured images, and thus a difference image is used to detect defects.
In the flaw detector disclosed in Japanese Patent Application Laid-Open No. 2015-94642, four oblique lighting devices are turned on in order while an inspection object is illuminated from directly above by a lighting device, and an image capturing device that is located directly above captures images of the inspection object. Difference processing is carried out by performing differential computations on images of a reference inspection object prepared in advance and the acquired images, so as to detect defects in the form of dents.
Incidentally, the external appearance inspection may result in over-detection due merely to the influence of black grime. Metal components (e.g., automobile components) formed by forging or casting have undergone surface treatment such as shot blasting, and their surfaces have a three-dimensional satin-finish structure with distributed microscopic asperities. The external appearance inspection targeted for such metal components may cause over-detection due to the influence of surface asperities that are not defects.